﻿using System;
using UnityEngine;

namespace SteeringBehaviors
{
	// Token: 0x0200021D RID: 541
	public class LookWhereYouAreGoing : Align
	{
		// Token: 0x06000B55 RID: 2901 RVA: 0x0005F4B3 File Offset: 0x0005D6B3
		public LookWhereYouAreGoing(MovementCharacter agent) : base(agent, null)
		{
			this.zeroSteering = new SteeringOutput();
		}

		// Token: 0x06000B56 RID: 2902 RVA: 0x0005F4C8 File Offset: 0x0005D6C8
		public override SteeringOutput GetSteering()
		{
			if (this.agent.velocity.sqrMagnitude == 0f)
			{
				return this.zeroSteering;
			}
			this.targetOrientation = Mathf.Atan2(this.agent.velocity.x, this.agent.velocity.z) * 57.29578f;
			return base.GetSteering();
		}

		// Token: 0x0400106A RID: 4202
		private SteeringOutput zeroSteering;
	}
}
